<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>王者荣耀</title>
  </head>
  <link rel="stylesheet" href="./css/reset.css" />
  <link rel="stylesheet" href="./css/common.css" />
  <style>
    .top {
      border: 1px solid #f5f5f5;
    }
    .top .area {
      display: flex;
      justify-content: space-between;

      /* align-items: normal;默认值是normal，但normal在弹性盒子中就是strech */
      /* align-items: stretch; */
      height: 41px;
      line-height: 41px;
    }
    .top .area .left-area {
      display: flex;
    }
    .top .area .left-area a {
      display: block;
      width: 150px;
      text-indent: -9999px;
      background: url(./img/top_logo.png) no-repeat center center;
      /* logo的高度由内容撑开，logo的高度默认弹性盒子布局normal */
    }
    .top .area .right-area {
      display: flex;
    }
    .top .area .right-area .item a {
      position: relative;
      display: block;
      font-size: 14px;
      color: #464646;
    }
    .top .area .right-area .item a.ranking {
      margin-left: 20px;
      padding-right: 30px;
    }
    .top .area .right-area .item a.growth {
      padding-left: 30px;
    }
    .top .area .right-area .item a .icon-grow {
      /*  */
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      /* 这里我的padding有点模糊了，还有a的继承line-height */
      margin: auto 0;
      /* display: inline-block; */
      /* 使用定位就成为脱标元素 */
      width: 30px;
      height: 30px;
      background: url(./img/top_sprite.png) no-repeat -30px 0;
    }
    .top .area .right-area .ranking::after {
      content: "";
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      margin: auto 0;
      width: 30px;
      height: 30px;
      background: url(./img/top_sprite.png) no-repeat 0 0;
      opacity: 0.1;
      transform: rotate(90deg);
    }
  </style>
  <body>
    <div class="top">
      <div class="area top_wrapper">
        <div class="left-area">
          <h2 class="logo">
            <a href="#">腾讯游戏</a>
          </h2>
          <div class="recommend">
            <img src="./img/recommend_game.jpg" alt="" />
          </div>
        </div>
        <ul class="right-area">
          <li class="item">
            <a class="growth" href="#">
              <i class="icon-grow"></i>
              成长守护平台
            </a>
          </li>
          <li class="item">
            <a class="ranking" href="#">腾讯游戏排行榜</a>
          </li>
        </ul>
      </div>
    </div>
  </body>
</html>
